Avoid copying the set_name by interning it.
authorMatthias Clasen <mclasen@redhat.com>
Tue, 27 Dec 2005 06:10:20 +0000 (06:10 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 27 Dec 2005 06:10:20 +0000 (06:10 +0000)
2005-12-27  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkbindings.c (gtk_binding_set_new): Avoid copying
the set_name by interning it.

ChangeLog
ChangeLog.pre-2-10
gtk/gtkbindings.c

index be8363bf43387e5444fa27a2ba6462d0d1f801d1..17c20c4a1a8d18a90a552f86bb44a6345e1a4d3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-27  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkbindings.c (gtk_binding_set_new): Avoid copying
+       the set_name by interning it.
+
 2005-12-26  Matthias Clasen  <mclasen@redhat.com>
 
        * gdk/x11/gdkdisplay-x11.c (gdk_display_open): Precache atoms
index be8363bf43387e5444fa27a2ba6462d0d1f801d1..17c20c4a1a8d18a90a552f86bb44a6345e1a4d3d 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-27  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkbindings.c (gtk_binding_set_new): Avoid copying
+       the set_name by interning it.
+
 2005-12-26  Matthias Clasen  <mclasen@redhat.com>
 
        * gdk/x11/gdkdisplay-x11.c (gdk_display_open): Precache atoms
index 46a786f496f71b44a4b10ccb10d1570c6d98ae33..1aa26eb8d045879c6d673b65ec56a1597c3bb372 100644 (file)
@@ -558,7 +558,7 @@ gtk_binding_set_new (const gchar    *set_name)
   g_return_val_if_fail (set_name != NULL, NULL);
   
   binding_set = g_new (GtkBindingSet, 1);
-  binding_set->set_name = g_strdup (set_name);
+  binding_set->set_name = g_intern_string (set_name);
   binding_set->widget_path_pspecs = NULL;
   binding_set->widget_class_pspecs = NULL;
   binding_set->class_branch_pspecs = NULL;
@@ -1442,7 +1442,6 @@ binding_set_delete (GtkBindingSet *binding_set)
   free_pattern_specs (binding_set->widget_class_pspecs);
   free_pattern_specs (binding_set->class_branch_pspecs);
 
-  g_free (binding_set->set_name);
   g_free (binding_set);
 }